import Vue from 'vue'
import Vuex from 'vuex'
import * as store from '@/utils/author.js'
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    auth: store.getUser()
  },
  mutations: {
    changeUser (state, params) {
      state.auth = params
      store.setUser(params)
    },
    delUser (state) {
      state.auth = {}
      store.delUser()
    }
  },
  actions: {

  }
})
